﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace SL.Participant
{
    public partial class Page_Final : UserControl
    {
        
        public Page_Final()
        {
            InitializeComponent();
        }
        public Page_Final(DateTime? WaveStart, DateTime? WaveFinish)
        {
            InitializeComponent();
            if (WaveStart.HasValue && WaveFinish.HasValue)
            {
                MessageFinished.Visibility = Visibility.Collapsed;
                MessageUnfinished.Visibility = Visibility.Visible;
                NextStudyNotification.Text = 
                    NextStudyNotification.Text.Replace(
                    "{0}", WaveStart.Value.ToShortDateString()
                    ).Replace("{1}", WaveFinish.Value.ToShortDateString());
            }
            else
            {
                MessageFinished.Visibility = Visibility.Visible;
                MessageUnfinished.Visibility = Visibility.Collapsed;                
            }
        }
    }
}
